#include <iostream>
using namespace std;

	
struct TreeNode {
	int val;
	TreeNode *left;
	TreeNode *right;
	TreeNode(int x) : val(x), left(NULL), right(NULL){}
};

TreeNode* invertTree(TreeNode* root)
{
	if(root == nullptr){
		return nullptr;
	}

	TreeNode* temp1=invertTree(root->left);
	TreeNode* temp2=invertTree(root->right);
	root->left=temp2;
	root->right=temp1;
	return root;
}

int main(int argc, char *argv[])
{
	
	return 0;
}
